package com.ruoyi.swap.realtime.kline.service.impl;

import java.util.List;

import com.ruoyi.swap.openapi.currencyPair.domain.SwapCurrencyPair;
import com.ruoyi.swap.realtime.kline.domain.VO.SwapKlineRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.swap.realtime.kline.mapper.SwapKlineRealtimeDataMapper;
import com.ruoyi.swap.realtime.kline.domain.SwapKlineRealtimeData;
import com.ruoyi.swap.realtime.kline.service.ISwapKlineRealtimeDataService;

/**
 * 实时K线监控Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-02
 */
@Service
public class SwapKlineRealtimeDataServiceImpl implements ISwapKlineRealtimeDataService 
{
    @Autowired
    private SwapKlineRealtimeDataMapper swapKlineRealtimeDataMapper;

    /**
     * 查询实时K线监控
     * 
     * @param id 实时K线监控主键
     * @return 实时K线监控
     */
    @Override
    public SwapKlineRealtimeDataVO selectSwapKlineRealtimeDataById(Integer id)
    {
        return swapKlineRealtimeDataMapper.selectSwapKlineRealtimeDataById(id);
    }

    /**
     * 查询实时K线监控列表
     * 
     * @param swapKlineRealtimeData 实时K线监控
     * @return 实时K线监控
     */
    @Override
    public List<SwapKlineRealtimeDataVO> selectSwapKlineRealtimeDataList(SwapKlineRealtimeDataVO swapKlineRealtimeData)
    {
        return swapKlineRealtimeDataMapper.selectSwapKlineRealtimeDataList(swapKlineRealtimeData);
    }

    /**
     * 新增实时K线监控
     * 
     * @param swapKlineRealtimeData 实时K线监控
     * @return 结果
     */
    @Override
    public int insertSwapKlineRealtimeData(SwapKlineRealtimeData swapKlineRealtimeData)
    {
        return swapKlineRealtimeDataMapper.insertSwapKlineRealtimeData(swapKlineRealtimeData);
    }

    /**
     * 修改实时K线监控
     * 
     * @param swapKlineRealtimeData 实时K线监控
     * @return 结果
     */
    @Override
    public int updateSwapKlineRealtimeData(SwapKlineRealtimeData swapKlineRealtimeData)
    {
        return swapKlineRealtimeDataMapper.updateSwapKlineRealtimeData(swapKlineRealtimeData);
    }

    /**
     * 批量删除实时K线监控
     * 
     * @param ids 需要删除的实时K线监控主键
     * @return 结果
     */
    @Override
    public int deleteSwapKlineRealtimeDataByIds(Integer[] ids)
    {
        return swapKlineRealtimeDataMapper.deleteSwapKlineRealtimeDataByIds(ids);
    }

    /**
     * 删除实时K线监控信息
     * 
     * @param id 实时K线监控主键
     * @return 结果
     */
    @Override
    public int deleteSwapKlineRealtimeDataById(Integer id)
    {
        return swapKlineRealtimeDataMapper.deleteSwapKlineRealtimeDataById(id);
    }

    @Override
    public List<SwapCurrencyPair> queryDatabasedata() {
        return swapKlineRealtimeDataMapper.queryDatabasedata();
    }

    @Override
    public void addnewcurrency_pair(String currencyPair,String currencyPair_api) {
         swapKlineRealtimeDataMapper.addnewcurrency_pair(currencyPair,currencyPair_api);
    }

    @Override
    public void deletenewcurrency_pair(String currencyPair) {
         swapKlineRealtimeDataMapper.deletenewcurrency_pair(currencyPair);
    }

    @Override
    public List<SwapKlineRealtimeDataVO> selectSwapAllData() {
        return swapKlineRealtimeDataMapper.selectSwapAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return swapKlineRealtimeDataMapper.queryCurryNumber(currencyPair);
    }

    @Override
    public List<SwapCurrencyPair> queryAllDatabasedata() {
        return swapKlineRealtimeDataMapper.queryAllDatabasedata();
    }

    @Override
    public void reactivateCurrencyPair(String currencyPair) {
        swapKlineRealtimeDataMapper.reactivateCurrencyPair(currencyPair);
    }

}
